package com.boatAnchorAssistant.service.bean.scheduling;

import com.boatAnchorAssistant.service.service.in.UserOperationLogService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * 【描 述】：
 * 【环 境】：J2SE 17
 * 【详 细】：
 *
 * @author 李松林
 * @version v1.0 2023/11/21 新建
 * @since 2023/11/21
 */
@Service
public class UserOperationLogScheduling {


    private final UserOperationLogService service;

    public UserOperationLogScheduling(UserOperationLogService service) {
        this.service = service;
    }


    /**
     * 定时处理操作日志
     * 后期可改成 xxlJob 触发
     */
    @Scheduled(cron = "0 * * * * ?")
    public void recordOperationLog() {
        service.recordOperationLog();
    }


}
